/*
package com.ice.cloud.hotelManagement.controller;

import com.ice.cloud.comm.api.PayApi;
import com.ice.cloud.comm.dto.FeeDeductionDTO;
import com.ice.cloud.comm.resp.R;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.RestTemplate;

@RestController
@RequestMapping("/hotelOrder")
public class HotelOrderController {
    //支付服务的URL（硬编码为本地地址）
    // public static final String payManagementUri = "http://payManagement";
    //用于发起HTTP请求的Spring工具类
    // @Autowired
    // RestTemplate restTemplate;
    @Resource
    PayApi payApi;
    @PostMapping("/oder100")
    public R oder100(@RequestParam("id") Integer id) {
        FeeDeductionDTO feeDeductionDTO = new FeeDeductionDTO();
        feeDeductionDTO.setId(id);
        feeDeductionDTO.setMoney(100D);
        System.out.println("来了----------------------------------");
        // R r = restTemplate.postForObject(payManagementUri + "/pay/feeDeduction",// // 目标URL
        //         feeDeductionDTO,  // 请求体（发送的数据）
        //         R.class);// 返回类型（期望的响应类型）
        R<String> r = payApi.feeDeduction(feeDeductionDTO);
        return r;
    }
}
*/
